<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var fruit = prompt('请输入要查询的水果');
        switch (fruit) {
            case '香蕉':
                alert('2.00元一斤');
                break;
            case '苹果':
                alert('3.50元一斤');
                break;
            case '榴莲':
                alert('25.00元一斤');
                break;
            default:
                alert('没有此水果');
        }
    </script>
</body>
</html>